<template>
    <div class="item">
        <span v-if="!flag"><slot name="normalImg"></slot></span>
        <span v-else><slot name="activeImg"></slot></span>
        <span>{{txt}}</span>
    </div>
</template>

<script>
export default {
    props:["txt"],
    data(){
        return {
            flag:false
        }
    }
}
</script>

<style lang="scss">
    .item{
        flex:1;
        display: flex;
        flex-direction:column;
        align-items: center;
        img{
            width:40px;
            height:40px;
        }
    }
</style>
